package com.manner.groupon.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 团购优惠券表
 *
 * @TableName tb_groupon_coupons
 */
@TableName(value = "tb_groupon_coupons")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class GrouponCoupons extends Object implements Serializable {

    /**
     * 主键自增，数据唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 外键商家编号
     */
    @TableField(value = "store_id")
    private String storeId;

    /**
     * 优惠券名称
     */
    @TableField(value = "title")
    private String title;

    /**
     * 团购券海报
     */
    @TableField(value = "img")
    private String img;

    /**
     * 团购券的价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 有效天数
     */
    @TableField(value = "effect_day")
    private Integer effectDay;

    /**
     * 每人限购几张
     */
    @TableField(value = "can_buy")
    private Integer canBuy;

    /**
     * 是否可以外带（0：不可外带，1：可外带）
     */
    @TableField(value = "is_to_go")
    private Integer isToGo;

    /**
     * 折扣
     */
    @TableField(value = "discount")
    private Double discount;

    /**
     * 利润率
     */
    @TableField(value = "profit")
    private Integer profit;

    /**
     * 已卖份数
     */
    @TableField(value = "sold_count")
    private Integer soldCount;

    /**
     * 划线价
     */
    @TableField(value = "un_line_price")
    private BigDecimal unLinePrice;

    /**
     * 库存
     */
    @TableField(value = "stock")
    private Integer stock;

    @TableField(value = "status")
    private int status;

    /**
     * 是否可用（0.不可用 1.可用）
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    /**
     *
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     *
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    private static final long serialVersionUID = 3508773761941335238L;
}